// -------------
// Projects page
// -------------

// added here as this rule only applies to the project list page
// as no other pages utilize the alerts class
.col-md-12 > .alerts:first-child {
  margin-top: 20px;
}

.empty-state-message .projects-instructions code {
  display: inline-block;
}

.project-additional-content.list-pf-additional-content {
  display: block;
}

.project-date, // from origin-web-catalog
.projects-list {
  [am-time-ago] {
    white-space: nowrap;
  }
}

.project-description.list-pf-description {
  color: @color-pf-black-800;
  .highlighted-content,
  .truncated-content {
    display: block;
    white-space: pre-line;
    .word-break();
  }
  .truncation-block {
    margin: 0;
  }
}

.project-info {
  &.list-pf-item {
    border-bottom: 0;
    border-color: #e0e0e0;
    padding: 0;
  }
}

.project-name-item.list-pf-title {
  @media (max-width: @screen-md-min) {
    margin-bottom: 10px;
  }
  .h3 {
    align-items: center;
    display: flex;
    margin-bottom: 10px;
    margin-top: 0;
    [data-toggle='tooltip'] {
      cursor: help;
      margin-left: 7px;
    }
    a {
      display: block;
      line-height: normal;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }
  small {
    color: @color-pf-black-600;
    font-size: @font-size-base;
    font-weight: normal;
    margin: 0;
  }
}

.projects-bar {
  display: flex;
  flex-direction: column;
  @media (min-width: 685px) {
    flex-direction: row;
    justify-content: space-between;
  }
  h1 {
    margin-bottom: 0 !important;
    margin-top: 0 !important;
  }
  .projects-add {
    display: flex;
    justify-content: flex-end;
    margin: -27px 0 0 0;
    @media (min-width: 685px) {
      display: block;
      margin-bottom: 20px;
      margin-left: 40px;
      margin-top: 0;
      order: 2;
    }
    .origin-modal-popup {
      @media (min-width: @screen-sm-min) {
        width: 370px;
      }
    }
  }
  .projects-options {
    display: flex;
    flex-direction: column;
    @media (min-width: 685px) {
      flex-direction: row;
    }
  }
  .projects-search {
    display: flex;
    margin-bottom: 20px;
    margin-top: 20px;
    @media (min-width: 685px) {
      margin-top: 0;
    }
    .search-pf {
      display: block;
      flex: 0 1 auto;
      &.has-button .form-group {
        display: block;
      }
    }
  }
  .projects-sort-label {
    .hidden-xs();
    margin-right: 6px;
    padding-top: 3px;
  }
  .projects-sort {
    flex: 1 0 auto;
    .form-group {
      margin: 0;
    }
    @media (max-width: @screen-xxs-max) {
      .dropdown-menu {
        left: auto;
        right: 0;
      }
    }
  }
  .vertical-divider {
    border-left: 1px solid #bbb;
    display: inline-block;
    height: 27px;
    margin: 0 7px;
    vertical-align: middle;
    width: 1px;
  }
}

.projects-header {
  margin-top: 21px;
}

.projects-instructions-link {
  white-space: pre;
}

.projects-list {
  border-top: 0;
  box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.15), 0 2px 2px 0 rgba(0, 0, 0, 0.1), 0 1px 5px 0 rgba(0, 0, 0, 0.09);
  margin-bottom: 20px;
  .project-info:hover {
    background-color: @table-bg-hover;
  }

  .origin-modal-popup {
    @media (min-width: @screen-sm-min) {
      margin-left: 15px;
      margin-top: -25px;
      width: 370px;
    }

    &.position-above {
      @media (min-width: @screen-sm-min) {
        margin-top: 20px;
      }
    }
  }

  .with-description {
    .origin-modal-popup {
      @media (min-width: @screen-sm-min) {
        margin-top: -42px;
      }
      @media (min-width: @screen-md-min) {
        margin-top: 0;
      }
      &.position-above {
        @media (min-width: @screen-sm-min) {
          margin-top: 20px;
        }
      }
    }
  }
}

.projects-list-create-popup {
  @media (min-width: @screen-sm-min) {
    form {
      width: 400px;
    }
  }
}
